home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / wlib11_2.zip / EXAMPLES.EXE / EXAM124.C < prev    next >
Text File  |  1991-02-17  |  960b  |  36 lines

  1.   #include <window.h>
  2.   #define NORM  CREATE_VIDEO_ATTRIBUTE(black,white)
  3.  
  4.   WPOINTER w;
  5.  
  6.   main()
  7.   {
  8.     WindowInitializeSystem();
  9.     WindowSaveInitial(0);
  10.     w = WindowInitialize(BORDER,1,1,30,10,NORM,NORM,SINGLEBOX);
  11.     WindowOpen(w);
  12.     WindowDisplay(w,1,NOEFFECT);
  13.     WindowWriteString(w,"Press a key to change columns",1,1);
  14.     GET_KEY();
  15.  
  16.     /* Set Video Mode to 132 x 25 columns (Works for ATI VGA card) */
  17.     SetVideoMode(0x23);
  18.     /* Adjust the screen information and redisplay window */
  19.     AdjustScreenInfo(0);
  20.     WindowDisplay(w,1,NOEFFECT);
  21.  
  22.     /* OK to adjust to new height */
  23.     WindowResizeWidth(w,100,ANCHORLEFT);
  24.  
  25.     WindowWriteString(w,"Now press a key to change back",2,1);
  26.     GET_KEY();
  27.  
  28.     /*  First we must resize window */
  29.     WindowResizeWidth(w,30,ANCHORTOP);
  30.  
  31.     /* Set back to 80 column mode */
  32.     SetVideoMode(3);
  33.     AdjustScreenInfo(0);
  34.     WindowDisplay(w,1,NOEFFECT);
  35.   }
  36.